package com.rongke.service.impl;

import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.rongke.mapper.SkuMapper;
import com.rongke.model.Sku;
import com.rongke.service.SkuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * @SkuServiceImpl
 * @商品skuServiceImpl
 * @version : Ver 1.0
 */
@Service
public class SkuServiceImpl extends ServiceImpl<SkuMapper, Sku> implements SkuService {

    @Autowired
    private SkuMapper skuMapper;

    /**
     * @根据条件查找商品sku
     * @param sku
     * @return
     */
    @Override
    public List<Sku> selectByCondition(Sku sku) {
        return skuMapper.selectByCondition(sku);
    }

    @Override
    public List<Sku> selectSkuListAndIdIn(Set<String> skuIds) {
        return skuMapper.selectSkuListAndIdIn(skuIds);
    }

    @Override
    public List<Sku> getSkuListAdmin(Map map) {
        return skuMapper.getSkuListAdmin(map);
    }

    @Override
    public Integer getSkuListCountAdmin(Map map) {
        return skuMapper.getSkuListCountAdmin(map);
    }
}
